package or;

import org.junit.jupiter.api.Test;

public class T0982 {

    public int countTriplets(int[] nums) {
        int[] ints=new int[1<<16];
        int re=0;
        for(int num :nums){
            for (int num2:nums){
                ints[num&num2]++;
            }
        }
        for(int num :nums){
            for (int i = 0; i < 1<<16 ; i++) {
                if((num & i)==0){

                    re+=ints[i];
                }
            }
        }
        return re;




    }

    @Test
    public void Test(){



    }
}
